<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<h1>JSON的创建</h1>
		<script>
			person = {
				name:'jack',
				age: 20,
				addr:{
					homeAddr:'吕梁市',
					workAddr:'太原学院'
				}
			};
			alert(person.name);
			alert(person.addr.homeAddr);
			alert(person['age']);
			
			students = [
			    {name:'zll',age:'24'},
			    {name:'ltj',age:'23'}
			];
			alert(students[1].age)
			
			s = {
				"sites": [
				{ "name":"菜鸟教程" , "url":"www.runoob.com" },
				{ "name":"google" , "url":"www.google.com" },
				{ "name":"微博" , "url":"www.weibo.com" }
				]
				}
			alert(s.sites[1].url)
		</script>
	</body>
</html>
